Skip to content

feat(interpreter): implement background execution with & and wait#590

Merged
chaliy merged 1 commit intomainfrom
claude/process-issues-systematically-AEJJh
Mar 14, 2026
Merged

feat(interpreter): implement background execution with & and wait#590
chaliy merged 1 commit intomainfrom
claude/process-issues-systematically-AEJJh

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 14, 2026

Summary

  • Background commands (cmd &) now properly set $! and track job state
  • wait builtin collects background job exit codes correctly
  • wait $pid waits for specific job by ID
  • Job table uses BTreeMap for ordered iteration
  • Added 7 integration tests

Closes #559

Test plan

  • 7 new integration tests (basic bg, VFS writes, multiple jobs, $!, wait PID, exit codes, mixed fg/bg)
  • All 1928 existing tests pass
  • Spec tests pass (background.test, wait.test)
  • Clippy clean, formatting clean

Closes #559

- Background commands (`cmd &`) now properly set `$!` to a job ID
  and store results in the job table for later retrieval
- `wait` builtin now collects background job exit codes correctly
- `wait $pid` waits for a specific job by ID
- Job table uses BTreeMap for ordered iteration
- Execution remains synchronous for deterministic output ordering
  in the virtual environment, but the job lifecycle is tracked
- Added 7 integration tests covering basic background, VFS writes,
  multiple jobs, $!, wait with PID, exit codes, and mixed fg/bg
@chaliy chaliy merged commit 08d4a33 into main Mar 14, 2026
23 checks passed
@chaliy chaliy deleted the claude/process-issues-systematically-AEJJh branch March 14, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(interpreter): real background execution with & and wait

1 participant